package cn.itcast.service;

import cn.itcast.interfaces.ClearService;
import cn.itcast.mapper.ClearMapper;
import cn.itcast.pojo.Result;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * @author: peterChen
 * @date: 2019/8/22 15:22
 * @description: TODO
 * @version: 1.0
 */
@Service(interfaceClass = ClearService.class)
@Transactional
public class ClearServiceImpl implements ClearService {

    @Autowired
    private ClearMapper clearMapper;

    /**
     * 根据日期，删除该日期之前的预约设置数据
     * @param today
     */
    @Override
    public void clearOrderSettingBeforeDate(Date today) {
        clearMapper.clearOrderSettingBeforeDate(today);
    }
}
